package com.itheima.d3_if_elseif;

/**
 * @author Dushaohua
 * @date 2024/4/17 12:13
 */
public class Student {
    String name;
    double score;
    public void printLevel(){
        if (score>=90 && score <=100){
            System.out.println("等级为：A");
        } else if (score>=80 && score<90) {
            System.out.println("等级为：B");
        } else if (score>=60 && score<80) {
            System.out.println("等级为：C");
        } else if (score>=0 && score<60){
            System.out.println("等级为：D");
        } else {
            System.out.println("您的成绩输入有误");
        }
    }
}
